package com.iv.durian.cloud.dao.mapper;

import com.iv.durian.cloud.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

    User get(@Param("id") Integer id, @Param("mobile") String mobile, @Param("email") String email,@Param("ticket") String ticket);

    int add(@Param("user") User user);

    int updatePassword(@Param("id") int id, @Param("password") String password);

    int updateStatus(@Param("id") int id, @Param("status") int status);

    List<User> list(@Param("status") Integer status, @Param("offset") int offset, @Param("limit") int limit);

    int count(@Param("status") Integer status);

    int updateTicket(@Param("id") int id, @Param("ticket") String ticket,@Param("expire") long expire);

    int cleanTicket(@Param("id") int id);

}
